﻿using MapMaker.Engine.CoreCommon;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MapMaker.Engine.Model.VXAce
{
	public class RPG_UsableItem : RPG_BaseItem
	{
		[RubyProperty("scope")]
		public int Scope { get; set; }

		[RubyProperty("occasion")]
		public int Occasion { get; set; }

		[RubyProperty("speed")]
		public int Speed { get; set; }

		[RubyProperty("animation_id")]
		public int AnimationID { get; set; }

		[RubyProperty("success_rate")]
		public int SuccessRate { get; set; }

		[RubyProperty("repeats")]
		public int Repeats { get; set; }

		[RubyProperty("tp_gain")]
		public int TPGain { get; set; }

		[RubyProperty("hit_type")]
		public int HitType { get; set; }

		[RubyProperty("damage")]
		public RPG_Damage Damage { get; set; }

		[RubyProperty("effects")]
		public List<RPG_Effect> Effects { get; set; }

		public class RPG_Damage
		{

			[RubyProperty("type")]
			public int Type { get; set; }

			[RubyProperty("element_id")]
			public int ElementID { get; set; }

			[RubyProperty("formula")]
			public object Formula { get; set; }

			[RubyProperty("variance")]
			public int Variance { get; set; }

			[RubyProperty("critical")]
			public bool Critical { get; set; }
		}

		public class RPG_Effect
		{

			[RubyProperty("code")]
			public int Code { get; set; }

			[RubyProperty("data_id")]
			public int DataID { get; set; }

			[RubyProperty("value1")]
			public double Value1 { get; set; }

			[RubyProperty("value2")]
			public double Value2 { get; set; }
		}

		internal static IEnumerable<dynamic> Export(IObjectManager factory, IEnumerable list)
		{
			throw new NotImplementedException();
		}

	}
}
